package com.situ.stmall.controller.api;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.situ.stmall.entity.Goods;
import com.situ.stmall.service.GoodsService;

@RestController
@RequestMapping("/api/goods")
public class APIGoodsController {
	
	@Autowired
	private GoodsService goodsService;

	@GetMapping("/search")
	public List search(Goods goods, Integer firstSortId) {
		//1参数
		//2service
		List list = goodsService.search(goods, firstSortId);
		//3返回
		return list;
	}
}
